home *** CD-ROM | disk | FTP | other *** search
- /* ANSI C code generated by SmallEiffel. */
- /*
- -- SmallEiffel -- Release (- 0.97) -- FRANCE
- -- Copyright (C), 1994 - Dominique COLNET and Suzanne COLLIN
- -- University Henri Poincare' - Nancy 1 - email colnet@loria.fr
- -- CRIN (Centre de Recherche en Informatique de Nancy)
- -- FRANCE
- */
- #include "pretty.h"
- void rT67copy(T67 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- T0 * rT67to_local_name(T67 *C,T0 * a1,int a2){
- T0 * R=NULL;
- {T179 *n=((T179*)new(179));
- rT179make(n,rT67pos((C)->_li,(C)->_co),XrT47to_string(rT137name((T137*)a1,a2)),rT137type((T137*)a1,a2),a2);
- R=(T0 *)n;}
- return R;
- }
- void rT67make(T67 *C,int a1,int a2){
- C->_li=a1;
- C->_co=a2;
- C->_to_string=oRBC67tmp_string;
- /*(IRF3*/(((T7*)(C)->_to_string)->_count)=(0);
- /*)*/}
- T0 * rT71add_comment(T71 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {
- {T218 *n=((T218*)new(218));
- rT218make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT71copy(T71 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- T0 * rT99run_type(T99 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- void rT99pretty_print(T99 *C){
- rT259put_string((T259*)oRBC27fmt,rT99written_mark(C));
- }
- int rT99nb(T99 *C){
- int R=0;
- R=((T78*)(C)->_n)->_value;
- return R;
- }
- int ofBC100base_class_name=0;
- T0*oRBC100base_class_name;
- T0 * rT99base_class_name(/*C*/void){
- T0 * R=NULL;
- if (ofBC100base_class_name==0){
- ofBC100base_class_name=1;
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms508,NULL);
- R=(T0 *)n;}
- oRBC100base_class_name=R;}
- return oRBC100base_class_name;}
- T0* rT99written_mark(T99 *C){
- T0* R=NULL;
- {T7 *n=((T7*)new(7));
- rT7copy(n,(T0 *)ms506);
- R=(T0 *)n;}
- rT7append((T7*)R,rT2to_string(rT99nb(C)));
- return R;
- }
- void rT99copy(T99 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT99make(T99 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_n=a2;
- }
- void rT98pretty_print(T98 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_written_mark);
- }
- T0 * rT98base_class_name(T98 *C){
- T0 * R=NULL;
- R=XrT56base_class_name((C)->_mapped);
- return R;
- }
- T0 * rT98base_class(T98 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)rT98base_class_name(C));
- return R;
- }
- void rT98copy(T98 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT98make(T98 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_mapped=a2;
- {T7 *n=((T7*)new(7));
- rT7copy(n,(T0 *)ms207);
- C->_written_mark=(T0 *)n;}
- rT7append((T7*)(C)->_written_mark,XrT56written_mark((C)->_mapped));
- }
- void rT97pretty_print(T97 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_written_mark);
- }
- T0 * rT97base_class_name(T97 *C){
- T0 * R=NULL;
- R=XrT56base_class_name((C)->_run_type);
- return R;
- }
- T0 * rT97base_class(T97 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)rT97base_class_name(C));
- return R;
- }
- void rT97copy(T97 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT97make(T97 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_like_what=a2;
- {T7 *n=((T7*)new(7));
- rT7copy(n,(T0 *)ms205);
- C->_written_mark=(T0 *)n;}
- rT7append((T7*)(C)->_written_mark,XrT65to_string((C)->_like_what));
- }
- void rT96pretty_print(T96 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_written_mark);
- }
- T0 * rT96base_class_name(T96 *C){
- T0 * R=NULL;
- R=XrT56base_class_name((C)->_run_type);
- return R;
- }
- T0 * rT96base_class(T96 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)rT96base_class_name(C));
- return R;
- }
- void rT96copy(T96 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT96make(T96 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_like_what=a2;
- {T7 *n=((T7*)new(7));
- rT7copy(n,(T0 *)ms204);
- C->_written_mark=(T0 *)n;}
- rT7append((T7*)(C)->_written_mark,((T86*)(C)->_like_what)->_to_string);
- }
- T0 * rT88base_class_name(T88 *C){
- T0 * R=NULL;
- R=XrT56base_class_name((C)->_run_type);
- return R;
- }
- T0 * rT88base_class(T88 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)rT88base_class_name(C));
- return R;
- }
- void rT88copy(T88 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT88make(T88 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_like_what=a2;
- if ((int)C->_like_what) switch (((T0 *)C->_like_what)->id) {
- case 87:
- break;
- default:
- C->_like_what = NULL;
- };}
- T0 * rT85run_type(T85 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT85start_position(T85 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT85base_class(T85 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT85copy(T85 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT85make(T85 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms181,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT101run_type(T101 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- void rT101pretty_print(T101 *C){
- rT259put_string((T259*)oRBC27fmt,rT101written_mark(C));
- }
- T0 * rT101base_class_name(/*C*/void){
- T0 * R=NULL;
- if (ofBC100base_class_name==0){
- ofBC100base_class_name=1;
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms508,NULL);
- R=(T0 *)n;}
- oRBC100base_class_name=R;}
- return oRBC100base_class_name;}
- T0* rT101written_mark(T101 *C){
- T0* R=NULL;
- {T7 *n=((T7*)new(7));
- rT7copy(n,(T0 *)ms507);
- R=(T0 *)n;}
- rT7append((T7*)R,XrT65to_string((C)->_n));
- return R;
- }
- void rT101copy(T101 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT101make(T101 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_n=a2;
- C->_nb=-(1);
- }
- int rT102is_boolean(T102 *C){
- int R=0;
- R=XrT56is_boolean((C)->_run_type);
- return R;
- }
- T0 * rT102start_position(T102 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_formal_name)->_start_position;
- return R;
- }
- void rT102pretty_print(T102 *C){
- rT259put_string((T259*)oRBC27fmt,rT102written_mark(C));
- }
- T0 * rT102base_class_name(T102 *C){
- T0 * R=NULL;
- R=XrT56base_class_name((C)->_run_type);
- return R;
- }
- T0 * rT102base_class(T102 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)rT102base_class_name(C));
- return R;
- }
- T0* rT102written_mark(T102 *C){
- T0* R=NULL;
- R=((T46*)(C)->_formal_name)->_to_string;
- return R;
- }
- void rT102copy(T102 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT102make(T102 *C,T0 * a1,int a2){
- C->_rank=a2;
- C->_formal_name=a1;
- }
- T0 * rT103start_position(T103 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- void rT103pretty_print(T103 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_written_mark);
- }
- T0 * rT103base_class(T103 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT103copy(T103 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT103make(T103 *C,T0 * a1,T0 * a2){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms185,a1);
- C->_base_class_name=(T0 *)n;}
- C->_generic_list=ma(104,0,1,a2);
- /*IF*/if (((T0 *)XrT56run_type(a2))==((T0 *)a2)) {
- C->_run_type=(T0 *)C;
- }
- /*FI*/{T7 *n=((T7*)new(7));
- rT7copy(n,(T0 *)ms210);
- C->_written_mark=(T0 *)n;}
- rT7append((T7*)(C)->_written_mark,XrT56written_mark(a2));
- rT7extend((T7*)(C)->_written_mark,'\135');
- }
- T0 * rT105run_type(T105 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT105start_position(T105 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT105base_class(T105 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT105copy(T105 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT105make(T105 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms187,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT107run_type(T107 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT107start_position(T107 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT107base_class(T107 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT107copy(T107 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT107make(T107 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms189,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT108run_type(T108 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT108start_position(T108 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT108base_class(T108 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT108copy(T108 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT108make(T108 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms196,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT109run_type(T109 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT109start_position(T109 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT109base_class(T109 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT109copy(T109 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT109make(T109 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms192,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT110run_type(T110 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT110start_position(T110 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- void rT110copy(T110 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT110make(T110 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms183,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT111run_type(T111 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT111start_position(T111 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT111base_class(T111 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT111copy(T111 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT111make(T111 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms184,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT112run_type(T112 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT112start_position(T112 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT112base_class(T112 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT112copy(T112 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT112make(T112 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms194,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT113run_type(T113 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT113start_position(T113 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- T0 * rT113base_class(T113 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT113copy(T113 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT113make(T113 *C,T0 * a1){
- {T46 *n=((T46*)new(46));
- rT46make(n,(T0 *)ms186,a1);
- C->_base_class_name=(T0 *)n;}
- }
- T0 * rT114run_type(T114 *C){
- T0 * R=NULL;
- R=(T0 *)C;
- return R;
- }
- T0 * rT114start_position(T114 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- void rT114pretty_print(T114 *C){
- rT259put_string((T259*)oRBC27fmt,rT114written_mark(C));
- }
- T0 * rT114base_class(T114 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- T0* rT114written_mark(T114 *C){
- T0* R=NULL;
- R=((T46*)(C)->_base_class_name)->_to_string;
- return R;
- }
- void rT114copy(T114 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- T0 * rT115start_position(T115 *C){
- T0 * R=NULL;
- R=((T46*)(C)->_base_class_name)->_start_position;
- return R;
- }
- void rT115pretty_print(T115 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_written_mark);
- }
- T0* rT115clone(T115 *C,T0* a1){
- T0* R=NULL;
- /*IF*/if (((int)a1)) {
- R=(T0 *)new(a1->id);
- AF_1
- XrT28copy(R,a1);
- AF_0
- }
- /*FI*/return R;
- }
- T0 * rT115base_class(T115 *C){
- T0 * R=NULL;
- R=rT46base_class((T46*)(C)->_base_class_name);
- return R;
- }
- void rT115copy(T115 *C,T0 * a1){
- C->_base_class_name=((T115*)a1)->_base_class_name;
- C->_written_mark=((T115*)a1)->_written_mark;
- C->_generic_list=rT115clone(C,((T115*)a1)->_generic_list);
- }
- void rT115make(T115 *C,T0 * a1,T0* a2){
- int _is_run=0;
- T0 * _t=NULL;
- int _i=0;
- C->_base_class_name=a1;
- C->_generic_list=a2;
- _is_run=1;
- {T7 *n=((T7*)new(7));
- rT7copy(n,((T46*)a1)->_to_string);
- C->_written_mark=(T0 *)n;}
- rT7extend((T7*)(C)->_written_mark,'\133');
- _i=1;
- while (!((_i)>(((T104*)a2)->_upper))) {
- _t=rT104item((T104*)(C)->_generic_list,_i);
- rT7append((T7*)(C)->_written_mark,XrT56written_mark(_t));
- _is_run=(_is_run)&&(((T0 *)XrT56run_type(_t))==((T0 *)_t));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(((T104*)a2)->_upper)) {
- rT7extend((T7*)(C)->_written_mark,'\54');
- }
- /*FI*/}
- rT7extend((T7*)(C)->_written_mark,'\135');
- /*IF*/if (_is_run) {
- C->_run_type=(T0 *)C;
- }
- /*FI*/}
- void rT58fatal_error(/*C*/T0* a1){
- rT43fatal_error((T43*)oRBC27eh,a1);
- }
- T0*oRBC58storage;
- void rT58storage_grow(/*C*/int a1){
- int _i=0;
- T0* _str=NULL;
- _i=((T42*)oRBC58storage)->_upper;
- rT42resize((T42*)oRBC58storage,1,(((T42*)oRBC58storage)->_upper)+(a1));
- while (!((_i)==(((T42*)oRBC58storage)->_upper))) {
- _i=(_i)+(1);
- {T7 *n=((T7*)new(7));
- rT7make(n,80);
- _str=(T0 *)n;}
- rT42put((T42*)oRBC58storage,_str,_i);
- }
- }
- int ofBC58sfr=0;
- T0*oRBC58sfr;
- T0 * rT58sfr(/*C*/void){
- T0 * R=NULL;
- if (ofBC58sfr==0){
- ofBC58sfr=1;
- {T39 *n=((T39*)new(39));
- /*(IRF3*/((n)->_mode)=((T0 *)ms26);
- /*)*/R=(T0 *)n;}
- oRBC58sfr=R;}
- return oRBC58sfr;}
- T0* rT58item(/*C*/int a1){
- T0* R=NULL;
- R=rT42item((T42*)oRBC58storage,a1);
- return R;
- }
- int ofBC58init_storage=0;
- void rT58init_storage(/*C*/void){
- if (ofBC58init_storage==0){
- ofBC58init_storage=1;
- rT58storage_grow(3000);
- }
- }
- void rT58copy(T58 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT58read(T58 *C,T0* a1){
- rT58init_storage();
- rT39connect_to((T39*)rT58sfr(),a1);
- /*IF*/if (rT39is_connected((T39*)rT58sfr())) {
- C->_count=0;
- while (!(rT39end_of_input((T39*)rT58sfr()))) {
- C->_count=((C)->_count)+(1);
- /*IF*/if ((((T42*)oRBC58storage)->_upper)<((C)->_count)) {
- rT58storage_grow(1000);
- }
- /*FI*/rT39read_line_in((T39*)rT58sfr(),rT42item((T42*)oRBC58storage,(C)->_count));
- }
- rT39disconnect((T39*)rT58sfr());
- }
- else {
- /*UT*/(T43*)oRBC27eh;
- rT43append((T0 *)ms75);
- /*UT*/(T43*)oRBC27eh;
- rT43append(a1);
- rT58fatal_error((T0 *)ms76);
- }
- /*FI*/}
- int rT92put_into(T92 *C,T0* a1,int a2){
- int R=0;
- int _rank=0;
- _rank=rT94index_of((T94*)a1,(T0 *)C);
- /*IF*/if ((_rank)<=(((T94*)a1)->_upper)) {
- /*UT*/(T43*)oRBC27eh;
- rT43add_position(rT92start_position(C));
- /*UT*/(T43*)oRBC27eh;
- rT43add_position(rT92start_position((T92*)rT94item((T94*)a1,_rank)));
- rT43error((T43*)oRBC27eh,(T0 *)ms509);
- }
- /*FI*/rT94put((T94*)a1,(T0 *)C,a2);
- R=(a2)+(1);
- return R;
- }
- T0 * rT92start_position(T92 *C){
- T0 * R=NULL;
- R=((T95*)(C)->_name)->_start_position;
- return R;
- }
- void rT92pretty_print(T92 *C){
- rT95pretty_print((T95*)(C)->_name);
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms571);
- XrT56pretty_print((C)->_type);
- }
- int rT92is_equal(T92 *C,T0 * a1){
- int R=0;
- R=rT7is_equal((T7*)rT95to_key((T95*)(C)->_name),rT95to_key((T95*)((T92*)a1)->_name));
- return R;
- }
- void rT92copy(T92 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT92make(T92 *C,T0 * a1,T0 * a2){
- C->_name=a1;
- C->_type=a2;
- }
- int rT140put_into(T140 *C,T0* a1,int a2){
- int R=0;
- T0 * _d1=NULL;
- int _i=0;
- _i=((T139*)(C)->_name_list)->_lower;
- R=a2;
- while (!((_i)>(((T139*)(C)->_name_list)->_upper))) {
- {T92 *n=((T92*)new(92));
- rT92make(n,rT139item((T139*)(C)->_name_list,_i),(C)->_type);
- _d1=(T0 *)n;}
- R=rT92put_into((T92*)_d1,a1,R);
- _i=(_i)+(1);
- }
- return R;
- }
- int rT140count(T140 *C){
- int R=0;
- R=rT139count((T139*)(C)->_name_list);
- return R;
- }
- void rT140pretty_print(T140 *C){
- int _i=0;
- _i=((T139*)(C)->_name_list)->_lower;
- rT95pretty_print((T95*)rT139item((T139*)(C)->_name_list,_i));
- _i=(_i)+(1);
- while (!((_i)>(((T139*)(C)->_name_list)->_upper))) {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms569);
- rT95pretty_print((T95*)rT139item((T139*)(C)->_name_list,_i));
- _i=(_i)+(1);
- }
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms570);
- XrT56pretty_print((C)->_type);
- }
- void rT140copy(T140 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT140make(T140 *C,T0* a1,T0 * a2){
- C->_name_list=a1;
- C->_type=a2;
- }
- T0 * rT168expression(T168 *C,int a1){
- T0 * R=NULL;
- R=XrT79item((C)->_list,a1);
- return R;
- }
- T0 * rT168first(T168 *C){
- T0 * R=NULL;
- R=rT168expression(C,1);
- return R;
- }
- int rT168count(T168 *C){
- int R=0;
- R=XrT79upper((C)->_list);
- return R;
- }
- void rT168pretty_print(T168 *C){
- int _i=0;
- rT259put_character((T259*)oRBC27fmt,'\50');
- _i=1;
- while (!((_i)>(rT168count(C)))) {
- XrT66pretty_print(rT168expression(C,_i));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(rT168count(C))) {
- rT259put_character((T259*)oRBC27fmt,'\54');
- }
- /*FI*/}
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- void rT168copy(T168 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT212pretty_print(T212 *C){
- int _i=0;
- rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,/*(IRF4*/(T0 *)ms112/*)*/);
- rT259level_incr((T259*)oRBC27fmt);
- /*IF*/if (((int)(C)->_header_comment)) {
- rT57pretty_print((T57*)(C)->_header_comment);
- }
- else {
- rT259indent((T259*)oRBC27fmt);
- }
- /*FI*//*IF*/if (((int)(C)->_list)) {
- _i=1;
- while (!((_i)>(((T156*)(C)->_list)->_upper))) {
- /*IF*/if ((((T259*)oRBC27fmt)->_zen_mode)&&((_i)==(((T156*)(C)->_list)->_upper))) {
- /*(IRF3*/(((T259*)oRBC27fmt)->_semi_colon_flag)=(0);
- /*)*/}
- else {
- /*(IRF3*/(((T259*)oRBC27fmt)->_semi_colon_flag)=(1);
- /*)*/}
- /*FI*/rT259indent((T259*)oRBC27fmt);
- rT62pretty_print((T62*)rT156item((T156*)(C)->_list,_i));
- _i=(_i)+(1);
- }
- }
- /*FI*/rT259level_decr((T259*)oRBC27fmt);
- rT259indent((T259*)oRBC27fmt);
- }
- void rT212copy(T212 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT212make(T212 *C,T0 * a1,T0 * a2,T0* a3){
- C->_start_position=a1;
- C->_header_comment=a2;
- C->_list=a3;
- }
- void rT258copy(T258 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- int rT258all_check(T258 *C){
- int R=0;
- R=((C)->_level)>=(0);
- return R;
- }
- void rT73bracketed_print(T73 *C){
- rT259put_character((T259*)oRBC27fmt,'\50');
- rT73pretty_print(C);
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- T0* rT73to_string(T73 *C){
- T0* R=NULL;
- {T7 *n=((T7*)new(7));
- rT7make(n,0);
- R=(T0 *)n;}
- rT7extend((T7*)R,'\47');
- {int iv1=(C)->_pretty_print_mode;
- if (0 == iv1) goto l2;
- goto l3;
- l2: ;
- rT7extend((T7*)R,(C)->_value);
- goto l1;
- l3: ;
- if (1 == iv1) goto l4;
- goto l5;
- l4: ;
- rT73character_coding((C)->_value,R);
- goto l1;
- l5: ;
- if (2 == iv1) goto l6;
- goto l7;
- l6: ;
- rT7extend((T7*)R,'\45');
- rT7extend((T7*)R,'\57');
- rT2append_in(((unsigned char)(C)->_value),R);
- rT7extend((T7*)R,'\57');
- goto l1;
- l7: ;
- l1: ;
- }
- rT7extend((T7*)R,'\47');
- return R;
- }
- T0 * rT73add_comment(T73 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {
- {T218 *n=((T218*)new(218));
- rT218make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT73print_as_target(T73 *C){
- rT73bracketed_print(C);
- rT259put_character((T259*)oRBC27fmt,'\56');
- }
- void rT73pretty_print(T73 *C){
- rT259put_string((T259*)oRBC27fmt,rT73to_string(C));
- }
- void rT73copy(T73 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT73make(T73 *C,T0 * a1,char a2,int a3){
- C->_start_position=a1;
- C->_value=a2;
- /*(IRF3*/((C)->_pretty_print_mode)=(a3);
- /*)*/}
- void rT73character_coding(/*C*/char a1,T0* a2){
- char _special='\0';
- {int iv1=a1;
- if (64 == iv1) goto l9;
- goto l10;
- l9: ;
- _special='A';
- goto l8;
- l10: ;
- if (8 == iv1) goto l11;
- goto l12;
- l11: ;
- _special='B';
- goto l8;
- l12: ;
- if (94 == iv1) goto l13;
- goto l14;
- l13: ;
- _special='C';
- goto l8;
- l14: ;
- if (36 == iv1) goto l15;
- goto l16;
- l15: ;
- _special='D';
- goto l8;
- l16: ;
- if (12 == iv1) goto l17;
- goto l18;
- l17: ;
- _special='F';
- goto l8;
- l18: ;
- if (92 == iv1) goto l19;
- goto l20;
- l19: ;
- _special='H';
- goto l8;
- l20: ;
- if (126 == iv1) goto l21;
- goto l22;
- l21: ;
- _special='L';
- goto l8;
- l22: ;
- if (10 == iv1) goto l23;
- goto l24;
- l23: ;
- _special='N';
- goto l8;
- l24: ;
- if (96 == iv1) goto l25;
- goto l26;
- l25: ;
- _special='Q';
- goto l8;
- l26: ;
- if (13 == iv1) goto l27;
- goto l28;
- l27: ;
- _special='R';
- goto l8;
- l28: ;
- if (35 == iv1) goto l29;
- goto l30;
- l29: ;
- _special='S';
- goto l8;
- l30: ;
- if (9 == iv1) goto l31;
- goto l32;
- l31: ;
- _special='T';
- goto l8;
- l32: ;
- if (0 == iv1) goto l33;
- goto l34;
- l33: ;
- _special='U';
- goto l8;
- l34: ;
- if (124 == iv1) goto l35;
- goto l36;
- l35: ;
- _special='V';
- goto l8;
- l36: ;
- if (37 == iv1) goto l37;
- goto l38;
- l37: ;
- _special='\45';
- goto l8;
- l38: ;
- if (39 == iv1) goto l39;
- goto l40;
- l39: ;
- _special='\47';
- goto l8;
- l40: ;
- if (34 == iv1) goto l41;
- goto l42;
- l41: ;
- _special='\42';
- goto l8;
- l42: ;
- if (91 == iv1) goto l43;
- goto l44;
- l43: ;
- _special='\50';
- goto l8;
- l44: ;
- if (93 == iv1) goto l45;
- goto l46;
- l45: ;
- _special='\51';
- goto l8;
- l46: ;
- if (123 == iv1) goto l47;
- goto l48;
- l47: ;
- _special='\74';
- goto l8;
- l48: ;
- if (125 == iv1) goto l49;
- goto l50;
- l49: ;
- _special='\76';
- goto l8;
- l50: ;
- l8: ;
- }
- rT7extend((T7*)a2,'\45');
- /*IF*/if ((_special)==('\0')) {
- rT7extend((T7*)a2,'\57');
- rT2append_in(((unsigned char)a1),a2);
- rT7extend((T7*)a2,'\57');
- }
- else {
- rT7extend((T7*)a2,_special);
- }
- /*FI*/}
- int rT49a_constant(T49 *C){
- int R=0;
- T0 * _fn=NULL;
- T0 * _e_current=NULL;
- /*IF*/if (rT49a_identifier(C)) {
- R=1;
- _fn=rT67to_feature_name((T67*)rT49tmp_name());
- {T87 *n=((T87*)new(87));
- rT87make(n,XrT65start_position(_fn),0);
- _e_current=(T0 *)n;}
- {T161 *n=((T161*)new(161));
- rT161make(n,_e_current,_fn);
- C->_last_expression=(T0 *)n;}}
- else if (rT49a_character_constant(C)) {
- R=1;
- C->_last_expression=(C)->_last_character_constant;
- }
- else if (rT49a_integer_constant(C)) {
- R=1;
- C->_last_expression=(C)->_last_integer_constant;
- }
- /*FI*/return R;
- }
- int rT49a_conditional(T49 *C){
- int R=0;
- T0 * _ifthenelse=NULL;
- /*IF*/if (rT49a_keyword(C,(T0 *)ms351)) {
- R=1;
- {T216 *n=((T216*)new(216));
- /*(IRF3*/((n)->_start_position)=(rT49pos((C)->_start_line,(C)->_start_column));
- /*)*/_ifthenelse=(T0 *)n;}
- rT49a_then_part_list(C,_ifthenelse);
- /*IF*/if (rT49a_keyword(C,(T0 *)ms105)) {
- /*(IRF3*/(((T216*)_ifthenelse)->_else_compound)=(rT49a_compound2(C,(T0 *)ms357,(T0 *)ms119));
- /*)*/}
- else {
- /*IF*/if (!(rT49a_keyword(C,(T0 *)ms119))) {
- rT49wcp(C,(T0 *)ms358);
- }
- /*FI*/}
- /*FI*/C->_last_instruction=_ifthenelse;
- }
- /*FI*/return R;
- }
- int rT49a_boolean_constant(T49 *C){
- int R=0;
- /*IF*/if (rT49a_keyword(C,(T0 *)ms158)) {
- {T71 *n=((T71*)new(71));
- /*(IRF3*/((n)->_start_position)=(rT49pos((C)->_start_line,(C)->_start_column));
- /*)*/C->_last_boolean_constant=(T0 *)n;}R=1;
- }
- else if (rT49a_keyword(C,(T0 *)ms159)) {
- {T72 *n=((T72*)new(72));
- /*(IRF3*/((n)->_start_position)=(rT49pos((C)->_start_line,(C)->_start_column));
- /*)*/C->_last_boolean_constant=(T0 *)n;}R=1;
- }
- /*FI*/return R;
- }
- int rT49a_then_part(T49 *C,T0 * a1){
- int R=0;
- T0 * _expression=NULL;
- /*IF*/if (rT49a_expression(C)) {
- R=1;
- _expression=XrT66add_comment((C)->_last_expression,rT49get_comments(C));
- /*IF*/if (!(rT49a_keyword(C,(T0 *)ms102))) {
- rT49wcp(C,(T0 *)ms352);
- }
- /*FI*/rT216add_if_then((T216*)a1,_expression,rT49a_compound1(C,(T0 *)ms353));
- }
- /*FI*/return R;
- }
- void rT49a_then_part_list(T49 *C,T0 * a1){
- /*IF*/if (!(rT49a_then_part(C,a1))) {
- rT49fcp(C,(T0 *)ms354);
- }
- /*FI*/while (!(!(rT49a_keyword(C,(T0 *)ms355)))) {
- /*IF*/if (!(rT49a_then_part(C,a1))) {
- rT49fcp(C,(T0 *)ms356);
- }
- /*FI*/}
- }
- T0 * rT49get_comments(T49 *C){
- T0 * R=NULL;
- /*IF*/if (((int)(C)->_last_comments)) {
- R=(C)->_last_comments;
- C->_last_comments=NULL;
- }
- /*FI*/return R;
- }
- int rT49a_parent(T49 *C){
- int R=0;
- int _old_column=0;
- int _old_line=0;
- /*IF*/if (rT49a_class_type(C)) {
- R=1;
- /*IF*/if (rT7is_equal((T7*)((T46*)rT49current_class_name(C))->_to_string,((T46*)XrT56base_class_name((C)->_last_class_type))->_to_string)) {
- rT49error(XrT56start_position((C)->_last_class_type),(T0 *)ms223);
- }
- /*FI*/{T116 *n=((T116*)new(116));
- rT116make(n,(C)->_last_class_type);
- C->_last_parent=(T0 *)n;}
- /*IF*/if (rT49a_keyword(C,(T0 *)ms226)) {
- rT49a_rename_list(C);
- /*IF*/if (((C)->_cc)==('\73')) {
- rT49wcp(C,(T0 *)ms230);
- C->_ok=rT49skip1(C,'\73');
- }
- /*FI*/}
- /*FI*/rT49a_new_export_list(C);
- /*IF*/if (rT49a_keyword(C,(T0 *)ms241)) {
- rT49a_undefine_list(C);
- }
- /*FI*//*IF*/if (rT49a_keyword(C,(T0 *)ms242)) {
- rT49a_redefine_list(C);
- }
- /*FI*//*IF*/if (rT49a_keyword(C,(T0 *)ms243)) {
- rT49a_select_list(C);
- }
- /*FI*/_old_line=(C)->_line;
- _old_column=(C)->_column;
- /*IF*/if (((((rT49a_keyword(C,(T0 *)ms244))||(rT49a_keyword(C,(T0 *)ms245)))||(rT49a_keyword(C,(T0 *)ms246)))||(rT49a_keyword(C,(T0 *)ms247)))||(rT49a_keyword(C,(T0 *)ms248))) {
- /*UT*/(T43*)oRBC27eh;
- rT43add_position(rT49pos(_old_line,_old_column));
- rT49fatal_error((T0 *)ms249);
- }
- /*FI*/C->_ok=rT49a_keyword(C,(T0 *)ms119);
- }
- /*FI*/return R;
- }
- void rT49a_parent_list(T49 *C,T0 * a1,T0 * a2){
- T0* _list=NULL;
- while (!(!(rT49a_parent(C)))) {
- /*IF*/if (!(_list)) {
- _list=ma(128,0,1,(C)->_last_parent);
- }
- else {
- rT128add_last((T128*)_list,(C)->_last_parent);
- }
- /*FI*/C->_ok=rT49skip1(C,'\73');
- /*(IRF3*/(((T116*)(C)->_last_parent)->_comment)=(rT49get_comments(C));
- /*)*/}
- /*IF*/if ((((int)a2))||(((int)_list))) {
- rT48set_parent_list((T48*)(C)->_last_base_class,a1,a2,_list);
- }
- /*FI*/}
- int rT49a_when_part(T49 *C,T0 * a1){
- int R=0;
- T0 * _constant=NULL;
- T0 * _e_when=NULL;
- int _state=0;
- /*IF*/if (rT49a_keyword(C,(T0 *)ms363)) {
- R=1;
- {T224 *n=((T224*)new(224));
- rT224make(n,rT49pos((C)->_start_line,(C)->_start_column),rT49get_comments(C));
- _e_when=(T0 *)n;}
- while (!((_state)>(3))) {
- {int iv1=_state;
- if (0 == iv1) goto l52;
- goto l53;
- l52: ;
- /*IF*/if (rT49a_constant(C)) {
- _constant=(C)->_last_expression;
- _state=1;
- }
- else if (rT49a_keyword(C,(T0 *)ms102)) {
- /*IF*/if (((int)_constant)) {
- rT224add_value((T224*)_e_when,_constant);
- }
- /*FI*//*(IRF3*/(((T224*)_e_when)->_compound)=(rT49a_compound1(C,(T0 *)ms364));
- /*)*/rT223add_when((T223*)a1,_e_when);
- _state=4;
- }
- else if (((C)->_cc)==('\54')) {
- rT49wcp(C,(T0 *)ms232);
- C->_ok=rT49skip1(C,'\54');
- }
- else {
- rT49fcp(C,(T0 *)ms365);
- _state=4;
- }
- /*FI*/goto l51;
- l53: ;
- if (1 == iv1) goto l54;
- goto l55;
- l54: ;
- /*IF*/if (rT49a_keyword(C,(T0 *)ms102)) {
- /*IF*/if (((int)_constant)) {
- rT224add_value((T224*)_e_when,_constant);
- }
- /*FI*//*(IRF3*/(((T224*)_e_when)->_compound)=(rT49a_compound1(C,(T0 *)ms366));
- /*)*/rT223add_when((T223*)a1,_e_when);
- _state=4;
- }
- else if (rT49skip2(C,'\56','\56')) {
- _state=2;
- }
- else if (rT49skip1(C,'\54')) {
- rT224add_value((T224*)_e_when,_constant);
- _constant=NULL;
- _state=0;
- }
- else {
- rT49fcp(C,(T0 *)ms365);
- _state=4;
- }
- /*FI*/goto l51;
- l55: ;
- if (2 == iv1) goto l56;
- goto l57;
- l56: ;
- /*IF*/if (rT49a_constant(C)) {
- rT224add_slice((T224*)_e_when,_constant,(C)->_last_expression);
- _constant=NULL;
- _state=3;
- }
- else {
- rT49fcp(C,(T0 *)ms365);
- _state=4;
- }
- /*FI*/goto l51;
- l57: ;
- /*IF*/if (rT49skip1(C,'\54')) {
- _state=0;
- }
- else if (rT49a_keyword(C,(T0 *)ms102)) {
- /*(IRF3*/(((T224*)_e_when)->_compound)=(rT49a_compound1(C,(T0 *)ms367));
- /*)*/rT223add_when((T223*)a1,_e_when);
- _state=4;
- }
- else if (rT49a_constant(C)) {
- _constant=(C)->_last_expression;
- rT49warning(rT67start_position((T67*)rT49tmp_name()),(T0 *)ms215);
- _state=1;
- }
- else {
- rT49fcp(C,(T0 *)ms365);
- _state=4;
- }
- /*FI*/ l51: ;
- }
- }
- }
- /*FI*/return R;
- }
- void rT49a_select_list(T49 *C){
- /*IF*/if (rT49a_feature_list(C)) {
- rT116set_select((T116*)(C)->_last_parent,(C)->_last_feature_list);
- }
- /*FI*/}
- int rT49a_unary(T49 *C){
- int R=0;
- /*IF*/if (rT49a_keyword(C,(T0 *)ms82)) {
- {T64 *n=((T64*)new(64));
- rT64make(n,(T0 *)ms82,rT49pos((C)->_start_line,(C)->_start_column));
- C->_last_prefix=(T0 *)n;}
- R=1;
- }
- else if (rT49skip1(C,'\53')) {
- {T64 *n=((T64*)new(64));
- rT64make(n,(T0 *)ms84,rT49pos((C)->_start_line,(C)->_start_column));
- C->_last_prefix=(T0 *)n;}
- R=1;
- }
- else if (rT49skip1(C,'\55')) {
- {T64 *n=((T64*)new(64));
- rT64make(n,(T0 *)ms85,rT49pos((C)->_start_line,(C)->_start_column));
- C->_last_prefix=(T0 *)n;}
- R=1;
- }
- /*FI*/return R;
- }
- int rT49a_rename_pair(T49 *C){
- int R=0;
- T0 * _rename_pair=NULL;
- T0 * _name1=NULL;
- /*IF*/if (rT49a_identifier(C)) {
- _name1=rT67to_feature_name((T67*)rT49tmp_name());
- /*IF*/if (rT49a_keyword(C,(T0 *)ms227)) {
- /*IF*/if (rT49a_identifier(C)) {
- R=1;
- /*IF*/if (rT7is_equal((T7*)((T67*)rT49tmp_name())->_to_string,XrT65to_string(_name1))) {
- rT49warning(rT67start_position((T67*)rT49tmp_name()),(T0 *)ms228);
- }
- else {
- {T117 *n=((T117*)new(117));
- rT117make(n,_name1,rT67to_feature_name((T67*)rT49tmp_name()));
- _rename_pair=(T0 *)n;}
- rT116add_rename((T116*)(C)->_last_parent,_rename_pair);
- }
- /*FI*/}
- else {
- rT49fcp(C,(T0 *)ms229);
- }
- /*FI*/}
- else {
- rT49go_back(C,XrT65start_position(_name1));
- }
- /*FI*/}
- /*FI*/return R;
- }
- void rT49a_rename_list(T49 *C){
- while (!(!(rT49a_rename_pair(C)))) {
- C->_ok=rT49skip1(C,'\54');
- }
- }
-